﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using System.Xml.Linq;

namespace DataSystem
{
    public class SchemaBuilder
    {
        public static XElement GetSchema(Connection conn)
        {
            XElement ele = new XElement("dataschema");

            // get all the tables

            var tables = conn.GetData("SELECT * FROM sys.Tables");

            foreach (var row in tables)
            {
                // get each table
                var table = conn.GetData("select * from " + row["name"]);
                foreach (var column in table.First())
                {
                }


            }







            return ele;
        }


        

        


    }
}
